<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="wf" uri="/augurit-wf"%>

<%@ include file="/common/meta.jsp"%>
<%@ include file="/common/meta_ext.jsp"%>
<%@ include file="/wf/public/meta_wf.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>预览处置证</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<style type="text/css">
			.titleCss{
				font-size:330%;
				text-align:center;
				font-weight: bold;
			}
			.justifyCss{
				width:30%;
				text-align:justify;
				text-justify:distribute-all-lines;
				text-align-last:justify;
			}
			.tdCss{
				font-size:200%;
				font-weight: bold;
			}
			.inputNoborder {
			    FONT-SIZE: 30px;
			    FONT-FAMILY: 宋体;
			    BORDER-RIGHT: #FFFFFF 1px solid;
			    BORDER-TOP: #FFFFFF 1px solid;
			    BORDER-LEFT: #FFFFFF 1px solid;
			    BORDER-BOTTOM: #FFFFFF 1px solid;
			}
			.bb{
				margin-left:80px;
			}
		</style>
		  <script src="${ctx}/resources/js/ext/adapter/ext/ext-base.js" type="text/javascript"></script>
         <script src="${ctx}/resources/js/ext/ext-all.js" type="text/javascript"></script>
         <script src="${ctx}/gzcgwsp/resources/js/YwUtil.js" type="text/javascript"></script>
	</head>
	<script type="text/javascript">

        
          function printCzz(){
          	var taskInstDbid=document.getElementById("taskInstDbid").value;
          	var templateCode =document.getElementById("templateCode").value;
          	var url="";
          	if(taskInstDbid==""){
          	    url= "${ctx}/yw-yn-jzfqwczz-pfsn-qx!printZs.action?id="+${id} + "&templateCode="+templateCode+"&fileCode=xzxkjds";
           }else{
            	url = "${ctx}/yw-yn-jzfqwczz-pfsn-qx!printZs.action?id="+${id} + "&templateCode="+templateCode+"&fileCode=xzxkjds&taskInstDbid="+taskInstDbid;
          	
          	}
            // var url = "${ctx}/yw-yn-jzfqwczz-pfsn-qx!printcz.action?id="+${id} + "&templateCode="+${templateCode}+"&fileCode=xzxkjds&taskInstDbid="+${taskInstDbid};
             //alert(url);
             YwUtil.openWin({url: url});
        }
        
        function saveCzz2(){
        	var templateCode = '${templateCode}';
        	var url;
        	if(templateCode == 'jzfqwczzpfqx_xz'){//新增
        		url = '${ctx}/yw-yn-jzfqwczz-pfsn-qx!saveCzz.action';
        	}else if(templateCode == 'jzfqwczzpfqx_bg'){//变更
        		url = '${ctx}/yw-yn-jzfqwczz-pfsnbg-qx!saveCzz.action';
        	}else{//延期
        		url = '${ctx}/yw-yn-jzfqwczz-pfsnyq-qx!saveCzz.action';
        	}
            var datenow = new Date();
           	Ext.Ajax.request({
              method:'post',
              url:url,
              params:{
                'id':document.getElementById("czzId").value,
                'zsbh':document.getElementById("zsbh").value,
                'zsno':document.getElementById("zsno").value,
                'zsrq':datenow,
                'fzrq':document.getElementById("fzrq").value,
                'fzdw':document.getElementById("fzdw").value,
                'pfczl':document.getElementById("pfczl").value
              },
              success:function(response){
                 var result=response.responseText;
                 if(result=="true"){                
                       alert("保存成功");
                 }else{
                     alert("保存失败！");
                 }
              },
              failure: function() {
                alert("保存失败！");
             }, 
              scope:this
           });
            
        }

        </script>
	<body>
		<form action="" method="POST" target="autoPrintIFrame">
		<input type="hidden" name="id" id="czzId" value="${id}"/>
		<input type="hidden" name="taskInstDbid" id="taskInstDbid" value="${taskInstDbid}"/>
		<input type="hidden" name="templateCode" id="templateCode" value="${templateCode}"/>
		<table border="0" width="100%" style="margin-top:10px">
			<tr>
				<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
				<td>
					<table width="650" border=0 align="center">
						<tr>
							<td>&nbsp;</td>
						</tr>
						<tr>
							<td class="titleCss"  align="center">广&nbsp;州&nbsp;市<br>建筑废弃物处置证（排放）</td>
						</tr>
						<tr>
							<td align="center" style="font-size:120%;letter-spacing:4px;">
								<br/>
								NO：&nbsp;（<input name="zsno" id="zsno" value="${zsno }" class="inputNoborder" style="FONT-SIZE: 20px;width:100px;"/>）&nbsp;
								排字第&nbsp;<input name="zsbh" id="zsbh" value="${zsbh }" class="inputNoborder" style="FONT-SIZE: 20px;width:100px;"/>号
							</td>
						</tr>
						<tr>
							<td class="titleCss"  align="center">
								<br/><br/>
							</td>
						</tr>
						<tr>
							<td style="font-size:120%;letter-spacing:4px;line-height:30px;FONT-FAMILY: 宋体;">
								&nbsp;&nbsp;&nbsp;&nbsp;根据《广州市市容环境卫生管理规定》第四十九条、《广州市余泥渣土管理条例》第六条规定，经审核，本工程符合建筑废弃物排放处置的许可条件，准予发证。
							</td>
						</tr>
						<tr>
							<td class="titleCss"  align="center">
								<br/><br/><br/><br/>
							</td>
						</tr>
						<tr>
							<td align="right" style="font-size:120%;letter-spacing:4px;line-height:30px;FONT-FAMILY: 宋体;">
								发证单位：<input name="fzdw" id="fzdw" value="${fzdw }" class="inputNoborder" style="FONT-SIZE: 20px;width:250px;"/>
							</td>
						</tr>
						<tr>
							<td align="right" style="font-size:120%;letter-spacing:4px;line-height:30px;FONT-FAMILY: 宋体;">
								<input id="fzrq" name="fzrq" value="<s:date name='fzrq' format="yyyy年MM月dd日"/>" type="text" style="width:180" onclick="WdatePicker({skin:'ext', dateFmt:'yyyy年MM月dd日'});" class="textdocWdate"/>
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							</td>
						</tr>
					</table>
				</td>
				<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
				<td valign="top">
					<table width="650" border="1" align="center" bordercolor="black">
						<tr><td colspan="4"></td></tr>
						<tr height="30px">
							<td width="20%" align="center" style="font-size:120%;letter-spacing:4px;line-height:30px;FONT-FAMILY: 宋体;">建设单位</td>
							<td width="80%" colspan="3">${sqdw }</td>
						</tr>
						<tr height="30px">
							<td width="20%" align="center" style="font-size:120%;letter-spacing:4px;line-height:30px;FONT-FAMILY: 宋体;">联系人</td>
							<td width="20%">${jsdwLxr}</td>
							<td width="20%" align="center" style="font-size:120%;letter-spacing:4px;line-height:30px;FONT-FAMILY: 宋体;">联系电话</td>
							<td width="20%">${jsdwLxrLxdh}</td>
						</tr>
						<tr height="30px">
							<td width="20%" align="center" style="font-size:120%;letter-spacing:4px;line-height:30px;FONT-FAMILY: 宋体;">工程名称</td>
							<td width="80%" colspan="3">${gcmc }</td>
						</tr>
						<tr height="30px">
							<td width="20%" align="center" style="font-size:120%;letter-spacing:4px;line-height:30px;FONT-FAMILY: 宋体;">工程地址</td>
							<td width="80%" colspan="3">${gcdz}</td>
						</tr>
						<tr height="30px">
							<td width="20%" align="center" style="font-size:120%;letter-spacing:4px;line-height:30px;FONT-FAMILY: 宋体;">许可范围</td>
							<td width="80%" colspan="3">排放建筑废弃物</td>
						</tr>
						<tr height="30px">
							<td width="20%" align="center" style="font-size:120%;letter-spacing:4px;line-height:30px;FONT-FAMILY: 宋体;">排放处置量</td>
							<td width="80%" colspan="3"><input id="pfczl" value="${pfczl }" style="width:100%"/></td>
						</tr>
						<tr height="30px">
							<td width="20%" align="center" style="font-size:120%;letter-spacing:4px;line-height:30px;FONT-FAMILY: 宋体;">有效期限</td>
							<td width="80%" colspan="3"><font style="letter-spacing:80px;">&nbsp;&nbsp;</font>${ysgsKgrq}&nbsp;&nbsp;至&nbsp;&nbsp;${ysgsWgrq}</td>
						</tr>
						<tr height="30px">
							<td width="20%" align="center" style="font-size:120%;letter-spacing:4px;line-height:30px;FONT-FAMILY: 宋体;">备注</td>
							<td width="80%" colspan="3"><textarea rows="8" style="width:100%" style="font-size:120%;letter-spacing:4px;line-height:30px;FONT-FAMILY: 宋体;" readonly>${bz}</textarea></td>
						</tr>
					</table>
				</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td colspan="4" align="center" style="font-size:120%;letter-spacing:4px;line-height:30px;FONT-FAMILY: 宋体;">
					<br><br>
				</td>
			</tr>
			<tr>
				<td colspan="4" align="center" style="font-size:120%;letter-spacing:4px;line-height:30px;FONT-FAMILY: 宋体;">
					<input type="button" id="saveCzz" onclick="saveCzz2();" value="保&nbsp;&nbsp;存" style="width:100px;"/> 
					<input type="button" onclick="printCzz();"  id="printzs" value="打&nbsp;&nbsp;印" style="width:100px;"/>
				</td>
			</tr>
		</table>
		
		
		
		
		</form>
		<div id="autoPrintDiv" style="display:none;"><iframe height='1000' width='700' name='autoPrintIFrame'/></div>
	</body>
</html>